package pine.web.dao;

import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceContext;

import org.springframework.orm.jpa.support.JpaDaoSupport;

/**
 * JPA支持类，系统类所有需要调用JPA进行操作的类都需要继承此类
 * @author GONGM
 * @version 1.0
 */
public abstract class AbstractJpaDaoSupport extends JpaDaoSupport {

	@PersistenceContext
	protected EntityManager em;
	
	@Resource(name="entityManagerFactory")
    public void setSuperEntityManagerFactory(EntityManagerFactory entityManagerFactory){
        super.setEntityManagerFactory(entityManagerFactory);
    }
}
